{% extends "baseTemp/base_user_center.html" %}
{% load staticfiles %}

{# 标题及描述 #}
{% block title %}
	<title>天天生鲜-用户中心</title>
	<meta name="description" content="">
	<meta name="keywords" content="">
{% endblock title %}

{# 主体 #}
{% block right_content %}
	<div class="right_content clearfix">
	  <div class="info_con clearfix">
	    <h3 class="common_title2">基本信息</h3>
	    <ul class="user_info_list">
	      <li><span>用户名：</span>{{ user.username }}</li>
	      {% if address %}
	      	<li><span>联系方式：</span>{{ address.phone }}</li>
	      	<li><span>联系地址：</span>{{ address.addr }}</li>
	      {% else %}
					<li><span>联系方式：</span>您暂时没有添加联系方式</li>
					<li><span>联系地址：</span>您暂时没有添加收货地址</li>
	      {% endif %}
	    </ul>
	  </div>
	  <h3 class="common_title2">最近浏览</h3>
	  <div class="has_view_list">
	    <ul class="goods_type_list clearfix">
	    	{% for commod in commod_li %}
	    		<li>
	    		  {# <a href="{% url 'commod:detail' %}"><img src="{% static "images/goods/goods003.jpg" %}"></a> #}
	    		  <a href="{% url 'commod:detail' commod.id %}"><img src="{{ commod.image.url }}"></a>
	    		  <h4><a href="{% url 'commod:detail' commod.id %}">{{ commod.name }}</a></h4>
	    		  <div class="operate">
	    		    <span class="prize">￥{{ commod.price }}</span>
	    		    <span class="unit">{{ commod.price }}/{{ commod.unite }}</span>
	    		    <a href="#" class="add_goods" title="加入购物车"></a>
	    		  </div>
	    		</li>
	    	{% empty %}
					<li>您最近没有浏览商品</li>
	    	{% endfor %}
	    </ul>
	  </div>
	</div>
{% endblock right_content %}
